/**
 * *****************************************************************************
 * Copyright (c) 1998, 2011 Oracle. All rights reserved. This program and the
 * accompanying materials are made available under the terms of the Eclipse
 * Public License v1.0 and Eclipse Distribution License v. 1.0 which accompanies
 * this distribution. The Eclipse Public License is available at
 * http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution
 * License is available at http://www.eclipse.org/org/documents/edl-v10.php.
 *
 * Contributors: Oracle - initial impl
 * ****************************************************************************
 */
package toplink;

import java.util.List;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import test.TestHibernate;

/**
 * Simulates a large load of order processing.
 *
 * @author James Sutherland
 */
public class TopLink {

    public static String PERSISTENCE_UNIT_NAME = "toplink-standalonePU";
    public static int REPEATS = 1;
    public static int THREADS = 2;
    protected static volatile int executions;
    public static int MAX_CONNECTIONS = 10;
    public static int MIN_CONNECTIONS = 10;
    public static int REPETITIONS = 1;
    public static int STEP = 50;
    public static List<Long> results;

    
    public static void main(String[] args) {

        final EntityManagerFactory emf = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);

        TestHibernate testHibernate = new TestHibernate(MAX_CONNECTIONS, MIN_CONNECTIONS, REPEATS, THREADS, REPETITIONS, STEP, emf);
        
        testHibernate.runAll();
        
        emf.close();
    }
}